<?php
    session_start();
    if (!isset($_SESSION["acc_logined"]) || "no" == $_SESSION["acc_logined"]) {
        header("location:/accHestia/src/view/feature/login");
    }
?>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>main page</title>
        <!-- script type="text/ecmascript" src= "/accHestia/lib/jqgrid/js/jquery.min.js"></script -->
        <script type="text/ecmascript" src= "/accHestia/lib/jqgrid/js/jquery-2.1.1.js"></script>
        <script type="text/ecmascript" src="/accHestia/lib/jqgrid/js/trirand/jquery.jqGrid.min.js"></script>
        <script type="text/ecmascript" src="/accHestia/lib/jqgrid/js/trirand/i18n/grid.locale-cn.js"></script>
        <script src= "/accHestia/lib/jquery_ui/1.12.1/jquery-ui.js"></script>

        <script src= "/accHestia/src/view/js/rpc.js"></script>
        <script src= "/accHestia/src/view/js/acc_tab.js"></script>
        <script src= "/accHestia/src/view/js/acc_jqgrid.js"></script>
        <script src= "/accHestia/src/view/js/misc.js"></script>
        <script src= "/accHestia/src/view/js/acc_search.js"></script>

        <link rel="stylesheet" type="text/css" media="screen" href="/accHestia/lib/jqgrid/css/jquery-ui.css" />
        <link rel="stylesheet" type="text/css" media="screen" href="/accHestia/lib/jqgrid/css/trirand/ui.jqgrid.css" />
        <link rel="stylesheet" type="text/css" href= "/accHestia/src/view/css/c3.css" />

        <script>
            $(document).ready(function(){
                init_acc_tabs("tabs");
                $('#id_li_new_voch').hide();
                $('#id_li_voch_query').hide();
                
                $(".ul_level3").hide();
                $(".ul_level1 .ul_level2").children().off("click").on("click", function() {
                   //$(".ul_level3").hide();
                   $(this).children().toggle(500); 
                });
                
                //for debug
                setTimeout(function() {$("#id_m1_voch_manage").click();}, 50);
                setTimeout(function() {$("#id_lnav_vochQeury").click();}, 100);
                setTimeout(function() {$("#id_lnav_newVoch").click();}, 100);
            });
        </script>
    </head>
    <body class="html">
        <div id="wrapper"> 
            <div id="header">
                <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/accHestia/src/view/element/header.php" ?>
            </div> 
            <div id="navsecond"> 
                <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/accHestia/src/view/element/left_nav.php" ?>
            </div>
            <div id="maincontent">
                <div class="work_area" id="iwork_area">
                    <div id="tabs" style="height:640px;">
                        <ul>
                            <li id="id_li_voch_welcom">
                                <a id="id_tab_title_voch_welcome" href="#id_tab_main_voch_welcome">凭管首页</a>
                            </li>
                            <li id="id_li_new_voch" value="firstShow">
                                <a id="id_tab_title_new_voch" href="#id_tab_main_new_voch">凭证录入</a>
                                <span class="ui-icon ui-icon-close" role="presentation">Remove Tab</span>
                            </li>
                            <li id="id_li_voch_query">
                                <a id="id_tab_title_ivoch_qeury" href="#id_tab_main_ivoch_qeury">凭证查询</a>
                                <span class="ui-icon ui-icon-close" role="presentation">Remove Tab</span>
                            </li>
                        </ul>
                        <div id="id_tab_main_voch_welcome">
                            <h2 style="text-align: center; font-size:2em; color:BlueViolet;">使用说明</h2>
                            <ul class="ul_level1">
                                <li>凭证录入
                                    <ul class="ul_level2">
                                        <li>附单
                                            <ul class="ul_level3">
                                                <li>进入[录入凭证]时激活(处于可录入状态)</li>
                                                <li>保存完一张凭证,要输入新凭证时激活</li>
                                                <li>按Tab键,激活日期拾取框,进行日期输入</li>
                                            </ul>
                                        </li>
                                        <li>凭证日期
                                            <ul class="ul_level3">
                                                <li>首次进入[凭证录入]时,为(当前会计月度+本账号+凭证字)最后一次的日期无效则为其月1号</li>
                                                <li>凭证保存后,新凭证的日期同前</li>
                                                <li>凭证日期确定后,自动激活首行首列的摘要框</li>
                                                <li>日期拾取框键盘动作
                                                    <ul class="ul_level4">
                                                        <li>PAGE UP: Move to the previous month.</li>
                                                        <li>PAGE DOWN: Move to the next month.</li>
                                                        <li>CTRL + PAGE UP: Move to the previous year.</li>
                                                        <li>CTRL + PAGE DOWN: Move to the next year.</li>
                                                        <li>CTRL + HOME: Open the datepicker if closed.</li>
                                                        <li>CTRL/COMMAND + HOME: Move to the current month.</li>
                                                        <li>CTRL/COMMAND + LEFT: Move to the previous day.</li>
                                                        <li>CTRL/COMMAND + RIGHT: Move to the next day.</li>
                                                        <li>CTRL/COMMAND + UP: Move to the previous week.</li>
                                                        <li>CTRL/COMMAND + DOWN: Move to the next week.</li>
                                                        <li>ENTER: Select the focused date.</li>
                                                        <li>CTRL/COMMAND + END: Close the datepicker and erase the date.</li>
                                                        <li>ESCAPE: Close the datepicker without selection.</li>
                                                    </ul>
                                                </li>
                                            </ul>
                                        </li>
                                        <li>会计科目
                                            <ul class="ul_level3">
                                                <li>输入时,键入关键字会自动过滤科目
                                                    <ul class="ul_level4">
                                                        <li>比如键入1,会列出[1001,现金]</li>
                                                        <li>比如键入现金,也会列出[1001,现金]</li>
                                                    </ul>
                                                </li>
                                                <li>自动过滤源,只包含可供用户记入的科目
                                                    <ul class="ul_level4">
                                                        <li>比如[5xxx,管理费用],其下有[5xxx01,办公费],则父科目管理费用不列示</li>
                                                    </ul>
                                                </li>
                                            </ul>
                                        </li>
                                        <li>流水号
                                            <ul class="ul_level3">
                                                <li>输入仅参考,保存时可能会有变化(多人作业时)</li>
                                                <li>凭证保存后,永久不变</li>
                                                <li>账套唯一</li>
                                                <li>最小为1,按1逐凭证递增</li>
                                                <li>凭证作废时不消耗该流水号</li>
                                                <li>结账时该流水号不变</li>
                                            </ul>
                                        </li>
                                        <li>凭证号
                                            <ul class="ul_level3">
                                                <li>仅供参考,保存时可能会有变化(多人作业时)</li>
                                                <li>月度+凭证字(收付转)唯一</li>
                                                <li>最小为1,按1逐凭证递增</li>
                                                <li>凭证作废时消耗该凭证号(但不再分配给新凭证)</li>
                                                <li>结账时重新按[凭证字]分类递增顺序排列凭证号,作废凭证的凭证号置为负值</li>
                                            </ul>
                                        </li>
                                        
                                    </ul>
                                </li>
                                <li>凭证查询...
                                </li>
                            </ul>
                        </div>
                        <div id="id_tab_main_new_voch" style="height:580px;">
                            <?php require_once $_SERVER['DOCUMENT_ROOT'] . '/accHestia/src/view/feature/vochManage/newVoch.php' ?>
                        </div>
                        <div id="id_tab_main_ivoch_qeury" style="height:580px; ">
                            <?php require_once $_SERVER['DOCUMENT_ROOT'] . '/accHestia/src/view/feature/vochManage/vochQuery.php' ?>
                        </div>
                    </div>
                </div>
            </div>
            <div id="footer">
                <p>Copyright 2012 XXX Foundation. &&  other information.</p>
            </div>
        </div> 
    </body>
</html>